import request from '@/utils/request'

// 查询菜单列表
export function listRk(query) {
  return request({
    url: '/ck/rk/list',
    method: 'get',
    params: query
  })
}

// 查询菜单详细
export function getMenu(menuId) {
  return request({
    url: '/system/menu/' + menuId,
    method: 'get'
  })
}

// 新增操作
export function rkInsertBatch(data) {
  return request({
    url: '/ck/rk/insertBatch',
    method: 'post',
    data: data
  })
}

// 修改
export function rkUpDateBatch(data) {
  return request({
    url: '/ck/rk/updateBatch',
    method: 'post',
    data: data
  })
}

// 删除
export function rkDeleteBatch(rkIndexs) {
  return request({
    url: '/ck/rk/' + rkIndexs,
    method: 'delete'
  })
}

// 导入
export function rkImport(file,mode) {
  return request({
    url: '/ck/rk/rkImport/' + mode,
    method: 'post',
    data: file
  })
}

// 导出
export function rkExport(data) {
  return request({
    url: '/ck/rk/rkExport',
    method: 'post',
    data: data
  })
}

// 设置redis 的拖拽数组
export function setTuozhuai(indexs) {
  return request({
    url: '/ck/rk/setTuozhuai/' + indexs,
    method: 'get'
  })
}

// 设置redis 的拖拽数组
export function getTuozhuai() {
  return request({
    url: '/ck/rk/getTuozhuai/',
    method: 'post'
  })
}
